<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	//获得项目的context root目录（名称）
	String path = request.getContextPath();
	//获取Web使用的协议（http）://服务器名称（localhost）:服务的端口号（8080）/
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>商品信息</title>
<!-- 设定起点 -->
<base href="<%=basePath%>">
<%--要包含下面的base.js，以能分页	--%>
<script type="text/javascript" src="js/base.js"></script>
</head>
<body>
	<h1>商品信息</h1>
	<a href="page/index.jsp">返回首页</a>
	<s:form action="/productAction" method="post">
		<%--下面三句可以不动			--%>
		<s:hidden name="page"></s:hidden>
		<s:if test="#request.pageView.totalRecord">
			<%--页数大于1才显示导航			--%>
			<s:if test="#request.pageView.totalPage > 1">
				<center><%@ include file="/share/page.jsp"%></center>
			</s:if>
			<table align="center">
				<tr>
					<td>产品名称</td>
					<td>产地</td>
					<td>保质期</td>
					<td>容量</td>
					<td>类别</td>
					<td>库存</td>
					<td>规格</td>
					<td>类型</td>
					<!-- <td>删除</td>
						<td>更新</td> -->
				</tr>
				<s:iterator value="#request.pageView.records" id="entity">
					<tr>
						<td>${entity.productName}</td>
						<td>${entity.place}</td>
						<td>${entity.sheiflife}</td>
						<td>${entity.size}</td>
						<td>${entity.sort}</td>
						<td>${entity.stock}</td>
						<td>${entity.specification}</td>
						<td>${entity.type}</td>
						<%-- <td><a href="deletestudentAction?id=${entity.id}">删除</a></td>
							<td><a href="getStudentIdstudentAction?id=${entity.id}">更新</a></td> --%>
					</tr>
				</s:iterator>
			</table>
		</s:if>
		<s:else>
			<center>没有记录</center>
		</s:else>
	</s:form>
</body>
</html>